home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 98 / Skunkware 98.iso / src / net / bind-contrib.tar.gz / bind-contrib.tar / contrib / msql / model.bind < prev    next >
Text File  |  1996-10-25  |  2KB  |  69 lines

  1. #
  2. # RCS Id:    $Id: model.bind,v 8.1 1996/10/25 04:57:41 vixie Exp $
  3. #
  4. # Name:        model
  5. # Purpose:    mSQL model definition for Mondo-DB
  6. # Author:    Mike Allard
  7. # Date:        21apr95
  8. #
  9. # Usage:    /usr/local/Minerva/bin/msql mondo < model
  10. # Description:    This file contains mSQL statements to (re)create the model
  11. #        for Mondo-DB.  NOTE: FEEDING THIS SCRIPT TO THE MSQL MONITOR
  12. #        WILL DESTROY ALL EXISTING MONDO-DB DATA!!!!
  13. #
  14. # Tables Used:    all tables dropped and recreated
  15. # References:    
  16. #
  17. # Change History:
  18. #
  19. # Date     Who  Changes Made
  20. # -------  ---  ------------------------------------------------------------
  21. # 21apr95  mja    Original version.
  22. # 28apr95  mja  Added people_index table.
  23. # 31may95  mja  Added inactive_data to people_index; added has_account table.
  24. # 31may95  cls  Moved address, type & os from dns to machines.
  25. # 07jul95  cls  Mv dns to rhit_dns, created msql_dns, msql_zones. 
  26. # 08aug95  cls  Shortened to bind specific tables
  27.  
  28. DROP   TABLE control \g
  29. CREATE TABLE control (
  30.     one_row        char(1)        primary key,
  31.     accountid    int        not null,
  32.     groupid        int        not null,
  33.     locationid    int        not null,
  34.     machineid    int        not null,
  35.     personid    int        not null,
  36.     dns_entry    int        not null,
  37.     zoneid        int        not null,
  38.     locked        int        not null
  39. )
  40. \g
  41.  
  42. INSERT INTO control
  43.     (one_row, accountid, groupid, locationid, machineid, dns_entry, personid, zoneid, locked)
  44. VALUES
  45.     ('A',     0,         0,       0,          0,         0,        0,        0,    0)
  46. \g
  47.  
  48. DROP   TABLE msql_dns \g
  49. CREATE TABLE msql_dns (
  50.     dns_entry    int        primary key,
  51.     zoneid        int        not null,
  52.     machine        char(40)    not null,
  53.     class        char(10)    not null,
  54.     type        char(10)    not null,
  55.     info        char(127)    not null,
  56.     assigned_time    int        not null,
  57.     importance    int        not null,
  58.     dynamic        int        not null
  59. )
  60. \g
  61.  
  62. DROP TABLE msql_zones \g
  63. CREATE TABLE msql_zones (
  64.     name        char(40)    primary key,
  65.     zoneid        int        not null
  66. )
  67. \g
  68.  
  69.